# Include this directory
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

# Enumerate source files
FILE(GLOB SRC_FILES *.cpp *.inl)
FILE(GLOB INC_FILES *.h)

SET(DEPENDENT_LIBS ${Boost_LIBRARIES})

# CGAL
LIST(APPEND DEPENDENT_LIBS cgal_wrapper)

ADD_LIBRARY(lib_igl SHARED ${SRC_FILES} ${INC_FILES})
SET_TARGET_PROPERTIES(lib_igl PROPERTIES OUTPUT_NAME "igl")
TARGET_INCLUDE_DIRECTORIES(lib_igl SYSTEM PRIVATE ${LIBIGL_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(lib_igl Mesh ${DEPENDENT_LIBS})

ADD_CUSTOM_TARGET(igl DEPENDS lib_igl)
